The present invention relates to a new synthetic process for producing N-substituted acrylamides and tertiary amines, for instance dialkylallylamine or triallylamine. Substituted acrylamides such as N,N-dimethylacrylamide can be polymerised optionally with other monomers to produce polymers useful as adhesives, fabric sizes and shale inhibitors etc. Allyl dialkyl amines such as allyldimethylamine can be salified or quaternised to produce water soluble monomers which can form water soluble polymers. An important use of allyl dialkyl amines is in the preparation of diallyldialkyl ammonium chloride which is commonly used to produce water soluble cationic polymers useful in coagulation and flocculation of solids in suspensions such as sewage sludge or paper making stock suspensions.
It is known to prepare N-substituted acrylamides from acid chlorides such as 3-chloropropionyl chloride. Typically the reaction would be carried out at temperatures between 0xc2x0 C. and 50xc2x0 C. A disadvantage of this particular route is the corrosive nature of the acid chlorides, and their high reactivity which can lead to various undesirable side products. It is also known to produce N-substituted acrylamides by pyrolysis of the corresponding aminoalkylamides in the presence of a suitable catalyst. Such processes are carried out at high temperatures, often above 150xc2x0 C.
One problem with the prior art processes is the occurrence of side reactions which result in lower yields and undesirable impurities which if not removed can adversely affect the properties of the corresponding polymers. On a commercial scale it is often difficult to obtain good yields of N-substituted acrylamides greater than 95% purity.
Another problem with the prior processes is that at such high temperatures it is often necessary to use greater amounts of polymerisation inhibitors. However, the residual inhibitors would need to be removed once the process is complete. Insufficient levels of inhibitor could result in the substituted acrylamide undesirably forming polymers. Furthermore at these high temperatures there is always the risk that free radical species result in the formation of dimers. Even quite low concentrations of dimers or low molecular weight polymer species in the N-substituted acrylamide monomer could be disadvantageous and adversely affect the polymerisation reaction and thus the properties of the final polymer product.
For the reasons set out above it would be desirable to use a process that may if required be carried out at more ambient temperatures and which could be used to prepare N-substituted acrylamides of high purity, for instance above 96% and preferably at least 97%. Furthermore it would also be desirable to use a process that avoids the use of corrosive acid chlorides.
One aspect of the invention relates to a process for the preparation of a mixture comprising a compound of formula (1) and a compound of formula (2) 
wherein
R1 is an optionally substituted C1-20 alkyl, optionally substituted C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl,
R2 is an optionally substituted C1-20 alkyl, optionally substituted C3-4 alkenyl or optionally substituted C5-7 cycloalkyl,
A is either S or NR3 
R3 is an optionally substituted C1-20 alkyl, optionally substituted C3-4 alkenyl or optionally substituted C5-7 cycloalkyl, or R2 and R3 together form a 5-7 membered ring which can contain an oxygen atom,
R4 is hydrogen or methyl,
R5 is an optionally substituted C1-20 alkyl, optionally substituted C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl and,
R6 is hydrogen or an optionally substituted C1-20 alkyl, optionally substituted C3-4 alkenyl or optionally substituted C5-7 cycloalkyl, or R5 and R6 together form a 5-7 membered ring which can contain an oxygen atom,
which comprises reacting a compound of formula (3) 
wherein Xxe2x88x92 is an anion, and R1, R2, R3, R4, R5 and R6 have the same meaning as above,
in an alkaline medium.
In a preferred form of invention A is NR3 and the compound of formula (1) is specifically a tertiary amine.
In one embodiment R1 is allyl or methallyl.
In one embodiment R2 is methyl or ethyl.
In another embodiment R3 is methyl or ethyl.
In a further embodiment R5 is C1-8 alkyl but is preferably selected from methyl, ethyl, n-propyl, iso-propyl, n-butyl and tertiary butyl.
In one other embodiment R6 is hydrogen or C1-8 alkyl but is preferably selected from methyl, ethyl, n-propyl, iso-propyl, n-butyl and tertiary butyl and Xxe2x88x92 is a halide, preferably chloride.
In a preferred embodiment of the invention R1 is allyl, R2 is methyl or ethyl, R3 is methyl or ethyl, R5 is C1-8 alkyl but is preferably selected from methyl, ethyl, n-propyl, iso-propyl, n-butyl and tertiary butyl, R6 is hydrogen or C1-8 alkyl but is preferably selected from methyl, ethyl, n-propyl, iso-propyl n-butyl and tertiary but, Xxe2x88x92 is preferably a halide, most preferably chloride.
According to the invention the mixtures of compounds of formula (1) and compound of formula (2) can conveniently be prepared by reacting a compound of formula (3) in the presence of a base or an alkali, such as an amine, metal oxide, metal hydroxide or ammonium hydroxide, for instance tertiary amine and/or hindered secondary amine, preferably sodium hydroxide, potassium hydroxide or calcium hydroxide. The reaction may be carried out in an aqueous medium at a pH greater than 8, preferably in the range 11 to 14. In one example the reaction is carried out at a temperature of up to 100xc2x0 C., preferably 10 to 30xc2x0 C. Desirably this can be achieved by addition of solid sodium hydroxide or other solid alkali metal hydroxides to the compound of formula (3). It is also possible to effect the elimination by adding an alkali solution, for example caustic soda solution. The alkali solution can be any alkali solution. The alkali is often above 10% strength preferably above 20%, more preferably above 30%, most preferably above 40%, for instance 46%.
Examples of compounds of formula (1) include allyldimethylamine, allyl diethylamine, allyl ethylmethylamine, dimethyl sulphide, allyl methyl sulphide and allyl ethyl sulphide.
Examples of compounds of formula (2) include N-methyl acrylamide, N-ethylacrylamide, N-n-propylacrylamide or N-isopropylacrylamide, N-methylmethacrylamide, N-ethylmethacrylamide, N-n-propylmethacrylamide, N-(2-ethylhexyl)acrylamide or N,N-dimethylacrylamide, N,N-diethylacrylamide, N,N-di n-propylacrylamide, N,N-di iso-propylacrylamide or N,N-dioctyl acrylamide, N-ethyl-N-methylacrylamide, N-methyl-N-propylacrylamide.
Examples of typical mixtures include allyldimethylamine with N-methyl acrylamide, allyldimethylamine with N-ethylacrylamide, allyldimethylamine with n-propylacrylamide, allyldimethylamine with N-isopropylacrylamide, allyldimethylamine with N-methylmethacrylamide, allyldimethylamine with N-ethylmethacrylamide, allyldimethylamine with N-n-propylmethacrylamide, allyldimethylamine with N-(2-ethylhexyl)acrylamide, allyldimethylamine with N,N-dimethylacrylamide, allyldimethylamine with N,N-diethylacrylamide, allyldimethylamine with N,N-di n-propylacrylamide, allyldimethylamine with N,N-di iso-propylacrylamide, allyldimethylamine with N,N-di octyl acrylamide, allyldimethylamine with N-ethyl-N-methylacrylamide, allyldimethylamine with N-methyl-N-propylacrylamide, allyldiethylamine with N-methyl acrylamide, allyldiethylamine with N-ethylacrylamide, allyldiethylamine with n-propylacrylamide, allyldiethylamine with N-isopropylacrylamide, allyldiethylamine with N-methylmethacrylamide, allyldiethylamine with N-ethylmethacrylamide, allyldiethylamine with N-n-propylmethacrylamide, allyldiethylamine with N-(2-ethylhexyl)acrylamide, allyldiethylamine with N,N-dimethylacrylamide, allyldiethylamine with N,N-diethylacrylamide, allyldiethylamine with N,N-di n-propylacrylamide, allyldiethylamine with N,N-di iso-propylacrylamide, allyldiethylamine with N,N di octyl acrylamide, allyldiethylamine with N-ethyl-N-methylacrylamide, allyldiethylamine with N-methyl-N-propylacrylamide, allyldimethylamine with N-methyl acrylamide, allyldimethylamine with N-ethylacrylamide, allyldimethylamine with n-propylacrylamide, allylethylmethylamine with N-isopropylacrylamide, allylethylmethylamine with N-methylmethacrylamide, allylethylmethylamine with N-ethylmethacrylamide, allylethylmethylamine with N-n-propylmethacrylamide, allylethylmethylamine with N-(2-ethylhexyl)acrylamide, allylethylmethylamine with N,N-dimethylacrylamide, allylethylmethylamine with N,N-diethylacrylamide, allylethylmethylamine with N,N-di n-propylacrylamide, allylethylmethylamine with N,N di iso-propylacrylamide, allylethylmethylamine with N,N di octyl acrylamide, allylethylmethylamine with N-ethyl-N-methylacrylamide, allylethylmethylamine with N-methyl-N-propylacrylamide. The most preferred mixture comprises N,N-dimethylacrylamide with allyldimethylamine.
In one preferred aspect of the invention the compounds of formula (1) and (2) are separated from the mixture by a distillation process. Since the compounds of formula (1) would tend to have a much lower boiling point than the compounds of formula (2) it would be normal to separate the compounds of formula (1) first. However, depending upon the relative boiling points of the two compounds with respect to the boiling point of the solvent one can choose any appropriate conditions for distilling off each of the fractions. Desirably this would be at temperatures up to 120xc2x0 C., preferably in the range 60-100xc2x0 C., more preferably 70-90xc2x0 C. Thus a process for recovering a compound of formula (1) is provided and a process for recovering a compound of formula (2) is provided.
It is also possible to separate compounds (1) and (2) when compound (1) is an amine by addition of a strong acid to the mixture to form a non-volatile salt of the amine, which facilitates removal of compound (2) from the acidified mixture by distillation. Compound (1) can then be regenerated from its salt with strong inorganic base and isolated by distillation, extraction and the like.
Many substituted acrylamides are solids, for instance N-isopropylacrylamide, N-tertiary butylacrylamide, and these can easily be filtered off either before or after removal of compound (1) depending upon the individual properties of the compounds.
As mentioned earlier in the specification the compound of formula (3) can easily be prepared using the novel process disclosed herein. The compound of formula (3) is prepared by reacting compound of formula (4) with compound of formula (5) 
wherein the substituents have the same meaning as defined above. The reaction can be carried out in the presence of any suitable solvent. Ideally the solvent is water, but it is possible to carry out the reaction in any protic solvent such as methanol or polyethylene glycol and in many aprotic solvents such as acetone and dimethylformamide. It is usual to carry out the process at a temperature of up to 100xc2x0 C., preferably 35-45xc2x0 C.
Examples of making suitable compounds of formula (3) include the reaction of allyl chloride, methallyl chloride, allyl bromide, dimethyl sulphate or benzyl chloride with any of NN-dimethyl-3-(dimethylamino) propanamide, NN-dimethyl-3-(diethylamino)-propanamide, N-(n-propyl)-3-(dimethylamino)-propanamide, NN-diethyl-3-(dimethylamino)-propanamide, N-iso-propyl-3-(diethylamino)-propanamide, N-N-(n-octyl)-3-(diethylamino)-propanamide, N-ethenyl-3-(dimethylamino)-propanamide, NN-diethylhexyl-3-(diethylamino)-propanamide, NN-diethyl-3-(dimethylamino)-2-methylpropanamide, NN-dimethyl-3-(methylmercapto) propanamide, N-(n-propyl)-3-(methylmercapto)-propanamide. A preferred reaction is between allyl chloride and N,N-dimethyl-3-(dimethylamino)-propanamide.
The invention encompasses a method for the synthesis of a mixture of compounds of formula (1) and (2) by a two step process. The compounds of formula (4) and (5) are reacted in a suitable solvent, for example water and at a temperature of up to 100xc2x0 C., preferably 35 to 45xc2x0 C. and then the intermediate of formula (3) that results from this step is reacted under alkaline conditions at a temperature of up to 100xc2x0 C., preferably 10-30xc2x0 C. to provide the mixture of compounds of formula (1) and (2).
In a more preferred embodiment of the invention the compound of formula (4) can be prepared by the reaction of an alkyl ester of (meth) acrylic acid with either a sulphide of formula (8) or preferably an amine of formula (6) at a temperature of below 100xc2x0 C., preferably below 30xc2x0 C. in order to effect Michael addition of the amine across the double bond. Desirably the alkyl ester of (meth) acrylic acid is methyl (meth) acrylate. Desirably a stoichiometric quantity of either the amine of formula (6) or sulphide of formula (8) is reacted with the alkyl ester of (meth) acrylic acid, the amine of formula (7) maybe reacted at temperatures in excess of 20xc2x0 C. often in excess of 40xc2x0 C. often in aprotic solvent and usually in the presence of a suitable amidation catalyst. This reaction converts the ester into the corresponding amide thus liberating the corresponding alkanol, which in the case of methyl (meth) acrylate will be methanol. Other ethylenically unsaturated carboxylic acid esters may be used in place of methyl (meth) acrylate, for instance ethyl acrylate, which would result in the liberation of ethanol. 
Wherein R2, R3, R5 and R6 are as defined before.
For instance methyl acrylate can be reacted with a molar equivalent of dimethylamine at a temperature of 30xc2x0 C. The product of this reaction can then be reacted with a stoichiometric equivalent of n-propylamine at a temperature of 40xc2x0 C.
Diethylamine may also be substitued for dimethylamine or ethyl mercaptan. It is possible to use other amines in place of n-propylamine, for instance, methylamine, dimethylamine, ethylamine, dimethylamine, n-octylamine and piperazine.
All of these amines are known or can be prepared according to known processes.
The invention also encompasses a process of producing a compound of formula (1) 
wherein
R1 is an optionally substituted C1-20 alkyl, C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl,
R2 is an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl,
A is either S or NR3, and
R3 is an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl, or R2 and R3 together form a 5-7 membered ring which can contain oxygen.
by the following steps
1) reaction of an alkyl ester of (meth) acrylic acid, for instance methyl (meth) acrylate first with a sulphide of formula (8) or preferably an amine of formula (6) at a temperature of below 100xc2x0 C., preferably below 50xc2x0 C., more preferably below 30xc2x0 C. in order to effect Michael addition of the amine across the double bond.
2) Once a stoichiometric quantity of the sulphide of formula (8) or amine of formula (6) has been reacted with the alkyl ester of (meth) acrylic acid the amine of formula (7) may be reacted at temperatures in excess of 20xc2x0 C. often in excess of 40xc2x0 C., often in a protic solvent and usually in the presence of a suitable amidation catalyst. This reaction converts the ester into the corresponding amide thus liberating methanol and forming the compound of formula (4) 
wherein
R2 is an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl,
A is either S or NR3,
R3 is an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl, or R2 and R3 together form a 5-7 membered ring which can contain oxygen.
R4 is hydrogen or methyl,
R5 is an optionally substituted C1-20 alkyl, C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl or
R6 is hydrogen or an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl or R5 and R6 together form a 5-7 membered ring which can include an oxygen atom.
3) The compound of formula (4) is reacted with the compound of formula (5)
R1xe2x80x94Xxe2x80x83xe2x80x83(5)
wherein
R1 is an optionally substituted C1-20 alkyl, C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl, preferably allyl or methallyl and X is an atom or moiety that is capable of forming an anion, preferably a halide, most preferably chloride. The compounds of formula (4) and (5) are reacted in a suitable solvent, for example water and at a temperature of up to 100xc2x0 C., preferably 35 to 45xc2x0 C. to form the intermediate of formula (3) 
wherein A+ is either S+ or N+R3 and R1 to R6 are defined above and Xxe2x88x92 is an anion, preferably halide, especially chloride.
4) Compound (3) is reacted under alkaline conditions at a temperature of up to 100xc2x0 C., preferably 10 to 30xc2x0 C. to provide the mixture of compounds of formula (1) and (2). 
5) The compounds of formula (1) and (2) can be separated from the mixture, by solvent extraction or preferably by a distillation process. The compound of formula (1) can easily be separated from the mixture comprising compounds (1) and (2) and water, if the boiling points of compounds (1) and (2) and water are well separated and (1) and (2) do not form azeotropic mixtures. Often the compound has a lower boiling point that the compound (2). Therefore compound (1) can normally be separated from the mixture by a distillation process. Normally the separated compound (1) is obtained in pure form. However, it may be necessary to carry out a further purification step in order to remove any residual compound (2). This purification step may for instance include washing with a suitable solvent for the compound of formula (2), which is not a solvent for the compound of formula (1). Often the compound of formula (1) would be obtained in subtantially pure form without the need for further purification.
Typical examples of compounds of formula (1) include allyldimethylamine, allyldiethylamine and allyl methyl sulphide. A typical use of compounds of formula (1) would be either to form the corresponding polymers, optionally with other monomers. Typically copolymers of allyldimethylamine with acrylamide can be used as flocculants in avarty of industries. Another more important use of a compound of formula (1) is in the preparation of diallyldialkylammonium halide by reaction of compound (1) with allyl chloride. Typically diallyldimethylammonium chloride (DADMAC) can be prepared by reacting allyldimethylamine with allyl chloride. DADMAC is a well known monomer that can be homopolymerised to form low molecular weight cationic polymers, suitable as coagulants for solids liquids separation. Alternatively DADMAC can be copolymerised with acrylamide to form higher molecular weight cationic polymers which are suitable for use as flocculants.
The invention further encompasses a process of producing a compound of formula (2) 
wherein
R4 is hydrogen or methyl,
R5 is an optionally substituted C1-20 alkyl, C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl,
R6 is hydrogen or an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl, or R5 and R6 together form a 5-7 membered ring which can contain an oxygen atom,
by the following steps
1) reaction of an alkyl ester of (meth) acrylic acid, for instance alkyl ester of (meth) acrylic acid, preferably methyl acrylate first with a sulphide of formula (8) or preferably an amine of formula (6) at a temperature of below 100xc2x0 C., preferably below 50xc2x0 C., more preferably below 30xc2x0 C. in order to effect Michael addition of the amine across the double bond.
2) Once a stoichiometric quantity of the sulphide of formula 8) or amine of formula (6) has been reacted with the alkyl ester of (meth) acrylic acid, the product of the reaction is reacted with the amine of formula (7) at temperatures in excess of 20xc2x0 C. often in excess of 40xc2x0 C., optionally with a protic solvent, preferably methanol and with an amidation catalyst, preferably sodium methoxide or dibutyl tin oxide. This reaction converts the ester into the corresponding amide thus liberating the corresponding alkanol and forming the compound of formula (4) 
wherein
R2 is an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl,
A is S or NR3,
R3 is an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl, or R2 and R3 together form a 5-7 membered ring which can contain oxygen.
R4 is hydrogen or methyl,
R5 is an optionally substituted C1-20 alkyl, C3-4alkenyl, optionally substituted C5-7 cycloalkyl, or optionally substituted benzyl and,
R6 is hydrogen or an optionally substituted C1-20 alkyl, C3-4 alkenyl or optionally substituted C5-7 cycloalkyl or R5 and R6 together form a 5-7 membered ring which can contain oxygen.
3) The compound of formula (4) is reacted with the compound of formula (5)
R1xe2x80x94Xxe2x80x83xe2x80x83(5)
wherein
R1 is an optionally substituted C1-20 alkyl, C3-4 alkenyl, optionally substituted C5-7 cycloalkyl or optionally substituted benzyl, preferably allyl or methallyl and X is an atom or moiety that is capable of forming an anion, preferably a halide, most preferably chloride. The compounds of formula (4) and (5) are reacted in a suitable solvent, for example water and at a temperature of up to 100xc2x0 C., preferably 35-45xc2x0 C. to form the intermediate of formula (3) 
wherein
A+ and R1 to R6 are as defined above and Xxe2x88x92 is an anion, preferably halide especially chloride.
4) Compound (3) is reacted under alkaline conditions at a temperature of up to 100xc2x0 C., preferably 10 to 30xc2x0 C. to provide the mixture of compounds of formula (1) and (2).
5) The compounds of formula (1) and (2) can often be separated from the mixture by a distillation process. The compound of formula (1) can easily be separated from the mixture comprising compound (1) and compound (2) and water, if the boiling points of compounds (1) and (2) and water are well separated and (1) and (2) do not form azeotropic mixtures. Usually the compound of formula (1) will have a lower boiling point than the compound of formula (2). The compound of formula (1) can therefore normally be removed from the mixture by a distillation process. Normally the separated compound of formula (2) is obtained in pure form. However, it may be necessary to carry out a further purification step in order to remove any residual compound of formula (1). This purification step may for instance include washing with a suitable solvent for the compound of formula (1), which is not a solvent for the compound of formula (2). Often the compound (1) can easily an effectively be obtained in subtantially pure form without the need for further purification.
Compounds of formula (2) are typically N-substituted or N,N-disubstituted acrylamides. Typically such compounds include N-methyl acrylamide, N-ethylacrylamide, N-n-propylacrylamide or N-isopropylacrylamide N-methylmethacrylamide, N-ethylmethacrylamide, N-n-propylmethacrylamide, N-(2-ethylhexyl)acrylamide, N,N-dimethylacrylamide, N,N-diethylacrylamide, N,N-di n-propylacrylamide, N,N di iso-propylacrylamide or N,N di octyl acrylamide N-ethyl-N-methylacrylamide, N-methyl-N-propylacrylamide. Typically such compounds can be polymerised optionally with other monomers to produce polymers useful as surface coatings for wood or for paper, adhesives, fabric sizes and shale inhibitors etc.
The invention provides a convenient process for the synthesis of a mixture of compounds (1) and (2) starting from commercially available material that can be conducted at moderate temperatures and it avoids the use of corrosive chemicals such as acid chlorides. Another advantage of the invention is the synthesis of the N-substituted acrylamides of formula (2), simultaneously with another commercially useful compound. The invention also surprisingly allows the compounds of formula (1) and formula (2) to be made in high yield and at a very high purity. In particular we have surprisingly found that N-substituted acrylamides, for instance N,N-dimethylacrylamide can be synthesized on a commercial scale, for instance in commercial quantities to a purity greater than 96%.